<script type="text/javascript" src="/js/clip/ZeroClipboard.js"></script> 
<link href="/admins/css/adminshare.css" rel="stylesheet" type="text/css" />
<link href="/admins/css/yundan.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/boxy/js/jquery.boxy.js"></script>
<link href="/js/boxy/css/boxy.css" media="screen" rel="stylesheet" type="text/css" >  
<script type="text/javascript">
    $(function() {
        window.alert = Boxy.alert;
        window.confirm = Boxy.confirm;
    });
</script>

<div class="dataTable">
    <table>         
        <tr>
            <th class="w3" width="15%" nowrap>登录名</th>
            <th class="w4" width="15%" nowrap>邮箱</th>
            <th class="w5" width="15%" nowrap>注册时间</th>
            <th class="w6" width="15%" nowrap>发单数</th>
            <th class="w7" width="15%" nowrap>最后登录时间</th>
            <th class="w8" width="15%" nowrap>最后登录IP</th>
            <th class="w9" width="15%" nowrap>登录次数</th>
        </tr>  

        <?php
		//var_dump($this->userlist);exit;
        if ($this->userlist) {
            foreach ($this->userlist as $Item) {
        ?>
                <tr>
                    <td class="w3" align="center"><a href="
					<?php 
					if(Uuch_Util::getRoleId() != 100){
                    	echo "/admini/manageuser/userdetail/id/". $Item->id;
					}else{
						echo "javascript:void();";
					}
					?>
                    " target="_blank"><?php echo $Item->nikename; ?></a></td>
                    <td class="w4" align="center"><?php echo $Item->email; ?></td>
                    <td class="w5" align="center"><?php echo $Item->datecreated; ?></td>
                    <td class="w5" align="center">
					<?php 
					    $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');  
        				$db = $bootstrap->getResource('db');
						$nums = $db->fetchOne(
						 "SELECT count(id) FROM uuch_waybill where userId = $Item->id and dateCreated >= '2016-06-01'"
						);
						echo $nums;
					 ?>
                    </td>
                    <td class="w7" align="center"><?php echo $Item->lastLogin; ?></td>
                    <td class="w8" align="center"><?php echo $Item->loginip; ?></td>
                    <td class="w9" align="center"><?php echo $Item->logintimes; ?></td>
                </tr>
		<?php
            }
        }
        ?>
    </table>
</div>                
<div class="toolbar">
    <?php echo $this->partial('paging.phtml', array("pages" => $this->userall,'')); ?>
</div>
